package com.xli.mis.codeitems.entity.dto;

import com.xli.dto.validation.group.IGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

@Data
public class CodeItemsDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 2716773186947980803L;

    @Schema(description = "字典项")
    @NotNull(message = "itemValue必填", groups = {IGroup.add.class, IGroup.update.class})
    private String itemValue;

    @Schema(description = "字典文本")
    @NotNull(message = "itemText必填", groups = {IGroup.add.class, IGroup.update.class})
    private String itemText;

    @Schema(description = "父项主键")
    private String pid;

    @Schema(description = "字典主键")
    @NotNull(message = "codeId必填", groups = {IGroup.add.class, IGroup.update.class})
    private String codeId;

    @Schema(description = "排序")
    private Integer orderNum;
}
